<?php
// Check to ensure this file is included in Joomla!
defined('_JEXEC') or die( 'Restricted access' );

jimport( 'joomla.application.component.view');

class Mwc_EmployeeViewBoard extends JView{
	function display($tpl = null){
		global $mainframe;
                              
        $model = $this->getModel(); 
		$document =& JFactory::getDocument();
        $document->setTitle(JText::_('BOARD_TITLE'));         
        // Adds parameter handling
        $params = clone($mainframe->getParams('com_mwc_employee'));          

        $limit          = $params->get('max_item', 4);     
        $limitstart     = JRequest::getVar('limitstart', 0, '', 'int');
        $total          = $model->getBoardTotal();
        jimport('joomla.html.pagination'); 
        $pagination     = new JPagination($total, $limitstart, $limit); 
        $items = $model->getBoard($limit, $limitstart);
         
		//$this->assignRef('lists',	$lists);
		$this->assignRef('params',	        $params);
		$this->assignRef('items',	        $items);
        $this->assignRef('total',           $total);
        $this->assignRef('limit',           $limit);
        $this->assignRef('limitstart',      $limitstart);
        $this->assignRef('pagination',      $pagination);          

		parent::display($tpl);
	}
}
?>
